local skynet = require "skynet"


local function main()	


	-- 加载协议并设置共享
	skynet.uniqueservice("common/proto", "./server/conf/proto.conf")

	-- 全局管理器开启
	skynet.newservice("char/char_manager")

	-- 开启socket
	local mgr = skynet.newservice("char/watchdog")
	
	-- 开启监听端口(linux -> poll)
	skynet.call(mgr, "lua", "start",{
		address 	= "0.0.0.0",
		port 		= 6091,
		maxclient	= 64,
		nodelay 	= true,	
	})

	skynet.error("角色服务器开启")
	
	-- 移除服务
	skynet.exit()		
end 


skynet.start(main)
